<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>新春送祝福</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    <script src="../js/jquery.js"></script>
    <link rel="stylesheet" href="../css/input.css">
</head>

<body>
    <form action="temp.php" class="col-md-12 col-sm-12" id="form_change"
      method="POST" 
    >
        <div class="input-group input_style">
            <span class="input-group-addon" id="basic-addon1">发送给谁：</span>
            <input type="text" class="form-control" aria-describedby="basic-addon1" name="to" placeholder="请输入要发送的对象">
        </div>
        <div class="input-group input_style">
            <span class="input-group-addon" id="basic-addon2">来自谁：</span>
            <input type="text" class="form-control" aria-describedby="basic-addon2" name="from" placeholder="请输入您的名称">
        </div>
        <div class="input-group input_style">
            <span class="input-group-addon" id="basic-addon3">祝福内容：</span>
            <textarea class="form-control" rows="6" placeholder="请写入你的祝福语" aria-describedby="basic-addon3" name="content"></textarea>
        </div>
        <div class="input-group input_style">
            <span class="input-group-addon" id="basic-addon4">选择背景图片：</span>
            <select class="form-control" name="select" aria-describedby="basic-addon4" id="select_picture">
                <option value="1" selected>背景1</option>
                <option value="2">背景2</option>
                <option value="3">背景3</option>
            </select>
        </div>
        <img src="background/方方背景1.jpg" style="width:100px;height:180px;margin-left:10px" id="show_picture" />
        <button type="submit" class="btn btn-primary col-md-12 col-xs-12 input_style">生成图片</button>
    </form>
</body>
<script>
$("#select_picture").change(function() {
    $("#show_picture").attr("src", "background/" + "方方"+$(this).children('option:selected').text() + ".jpg");
})
</script>

</html>
